/**
  ******************************************************************************
  * @file           : main.c
  * @brief          : Main program body
  ******************************************************************************
  * @attention
  *
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include "stdint.h"
#include "at32f435_437_conf.h"
#include "os_obj.h"
#include "bsp_api.h"

/* Private includes ----------------------------------------------------------*/
void app_main(void);
void system_clock_config(void);

/**
  * @brief  The application entry point.
  * @retval int
  */
int main(void)
{
	stack_init();
	system_clock_config();
	system_core_clock_update();

	osKernelInitialize(); // Initialize CMSIS-RTOS

	thread_init();

	if (osKernelGetState() == osKernelReady)
	{
		osKernelStart(); // Start thread execution
	}

	osThreadYield();

	/*usb scan*/
	while (1)
	{
		osDelay(100000);
	}
	/* USER CODE END 3 */
}

/**
  * @brief  This function is executed in case of error occurrence.
  * @retval None
  */
void Error_Handler(void)
{
}

void atask1(void){};
void atask2(void){};
void atask3(void){};
void atask4(void){};
void atask5(void){};
	
void ainit11(void){};
void ainit12(void){};
void ainit13(void){};
void ainit21(void){};
void ainit22(void){};
void ainit23(void){};
void ainit31(void){};
void ainit32(void){};
void ainit33(void){};
void ainit41(void){};
void ainit42(void){};
void ainit43(void){};	
	

